<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>免费测斑</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <!--标准mui.css-->
    <link rel="stylesheet" href="../css/mui.min.css">
    <script src="../js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../js/getUrlParam.js"></script>
    <script src="../js/cookieutil.js" type="text/javascript" charset="utf-8"></script>
    <!--App自定义的css-->
    <!--<link rel="stylesheet" type="text/css" href="../css/app.css"/>-->
    <style>
        .imgsrc{
            width: 40px;height: 35px;
        }
        .textsize{
            font-size: 0.5rem;}
        li{ list-style:none; }
    </style>

</head>
<body>
<div class="mui-content" >
    <div class="headage"></div>
    <ul class="mui-table-view mui-table-view-chevron " style="margin-top: 2px!important;" id="userfree">
    </ul>
    <div class="footerpage">
    </div>
</div>

</body>
<script src="../js/mui.min.js"></script>
<script src="../js/practise/push.js"></script>
<script>
    $(function(){
        var gallery = mui('.mui-slider');
        gallery.slider({
            interval:5000//自动轮播周期，若为0则不自动播放，默认为0；
        });
        /*公共部分
         * 导航栏
         * footer CopyRight
         */

        $(".headage").load("head.html");
        $(".footerpage").load("footer.html");
        var  userid=getCookie('userid');
        if (userid==null||userid==undefined)
        {
            getindex();
        }else {
            mui.post('/Order/findUserId',
                {
                    userid: userid,
                    typedata: 0
                }, function (data) {
                    if (data.code && data.object.length > 0) {
                        var x = document.getElementById("userfree");
                        var str = "";
                        for (var i in data.object) {
                            var item = data.object[i];
                            console.log(item);
                            str += '<li class="mui-table-view-cell mui-media" id="';
                            str += item.id;
                            str += '">';
                            str += '<a class="mui-navigate-right" ';
                            str += 'href="userfreedetail.html?id=' + item.id + '">';
                            str += '<img class="mui-media-object mui-pull-left" src="';
                            str +=   item.userimg;
                            str +=   '"/>';
                            str += '<div class="mui-media-body" style="font-size: 12px;">';
                            str += "免费测斑"+'<span style="float: right;margin-right: 5px;">';
                            str +=  getstatustypefree(item.statustype)+'</span>';
                            str += '<p class="mui-ellipsis" style="font-size: 12px;">';
                            str += "下单时间：" + formattime(item.createtime);
                            str += '</p>';
                            str += '</div>';
                            str += '</a>';
                            str += '</li>';
                        }
                        x.innerHTML = str;//改变内容
                    }
                }, 'json'
            );
        }

    });
</script>
</html>